package com.shensi.adminCollect.service.system.impl;



import com.shensi.adminCollect.domain.system.SysAppUserInfoUser;
import com.shensi.adminCollect.mapper.system.AppUserInfoUserMapper;
import com.shensi.adminCollect.service.system.IAppUserInfoUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 油站信息Service业务层处理
 * 
 * @author qujia
 * @date 2020-12-08
 */


@Service
public class AppUserInfoUserServiceImpl implements IAppUserInfoUserService
{


    @Autowired
    private AppUserInfoUserMapper appUserInfoUserMapper;
    /**
     * 查询会员信息
     *
     * @param userId 会员信息
     * @return 会员信息
     */
    public SysAppUserInfoUser selectAppUserInfoById(Long userId){
        return appUserInfoUserMapper.selectAppUserInfoById(userId);
    }


    /**
     * 查询新用户
     *
     * @param enterpriseId 油企id
     * @return 会员信息
     */
    public List<SysAppUserInfoUser> selectNewAppUser(Long enterpriseId){
        return appUserInfoUserMapper.selectNewAppUser(enterpriseId);
    }


    /**
     * 查询会员统计信息
     *
     * @param appUserInfo 会员信息
     * @return 油罐信息
     */
    public SysAppUserInfoUser selectAppUserInfoSum(SysAppUserInfoUser appUserInfo){
        return appUserInfoUserMapper.selectAppUserInfoSum(appUserInfo);
    }
    /**
     * 查询会员信息列表
     *
     * @param appUserInfo 会员信息
     * @return 会员信息集合
     */
    public List<SysAppUserInfoUser> selectAppUserInfoList(SysAppUserInfoUser appUserInfo){
        return appUserInfoUserMapper.selectAppUserInfoList(appUserInfo);
    }


    /**
     * 查询会员信息列表,通过会员信息表
     *
     * @param appUserInfo 会员信息
     * @return 会员信息集合
     */
    public List<SysAppUserInfoUser> selectAppUserInfoTable(SysAppUserInfoUser appUserInfo){
        return appUserInfoUserMapper.selectAppUserInfoTable(appUserInfo);
    }


    /**
     * 新增会员信息
     *
     * @param appUserInfo 会员信息
     * @return 结果
     */
    public int insertAppUserInfo(SysAppUserInfoUser appUserInfo){
        return appUserInfoUserMapper.insertAppUserInfo(appUserInfo);
    }


    /**
     * 修改会员信息
     *
     * @param appUserInfo 会员信息
     * @return 结果
     */
    public int updateMember(SysAppUserInfoUser appUserInfo){
        return appUserInfoUserMapper.updateAppUserInfo(appUserInfo);
    }


    /**
     * 删除会员信息
     *
     * @param userId 会员信息ID
     * @return 结果
     */
    public int deleteAppUserInfoById(Long userId){
        return appUserInfoUserMapper.deleteAppUserInfoById(userId);
    }


    /**
     * 批量删除会员信息
     *
     * @param userIds 需要删除的数据ID
     * @return 结果
     */
    public int deleteAppUserInfoByIds(Long[] userIds){
        return appUserInfoUserMapper.deleteAppUserInfoByIds(userIds);
    }


    public SysAppUserInfoUser getOne(SysAppUserInfoUser appUserInfoUser){
        return appUserInfoUserMapper.getOne(appUserInfoUser);
    }

    @Override
    public int resetUserGrowUpValue(Long enterpriseId) {
        return appUserInfoUserMapper.resetUserGrowUpValue(enterpriseId);
    }

    @Override
    public void updateFollowStatus(SysAppUserInfoUser appUserInfo) {
        appUserInfoUserMapper.updateFollowStatus(appUserInfo);
    }
}
